<?php
declare (strict_types=1);

namespace app\exam\service;

use think\facade\Request;
use app\common\service\BaseService;
use app\exam\logic\Examination as ExaminationLogic;

/**
 * 公开考试服务类
 */
class Examination extends BaseService
{

	/**
	 * 获取公开考试列表
	 * Author 亓官雨树<lucky.max@foxmail.com>
	 * Date 2021-02-21
	 * @return [type] [description]
	 */
	public function getExaminationList()
	{
		$param = Request::get();
		$data  = app(ExaminationLogic::class)->getExaminationList($param);

		return $this->parseToData($data, 1, '获取成功');
	}

	/**
	 * 搜索公开考试列表
	 * Author 亓官雨树<lucky.max@foxmail.com>
	 * Date 2021-02-21
	 * @return [type] [description]
	 */
	public function search()
	{
		$param = Request::get();
		$data  = app(ExaminationLogic::class)->search($param);

		return $this->parseToData($data, 1, '获取成功');
	}

	/**
	 * 公开考试分类树
	 * Author 亓官雨树<lucky.max@foxmail.com>
	 * Date 2021-02-21
	 * @return [type] [description]
	 */
	public function getExaminationCategory()
	{
		$param = Request::get();
		$data  = app(ExaminationLogic::class)->getExaminationCategory($param);

		return $this->parseToData($data, 1, '获取成功');
	}

}
